package collection;

import java.util.LinkedHashSet;

public class LinkedHashSetTest {
    public static void main(String[] args) {
        LinkedHashSet<Person> set = new LinkedHashSet<Person>();
        set.add(new Person("张三",1));
        set.add(new Person("李四",2));
        set.add(new Person("王五",3));
        set.add(new Person("赵六",4));

        for(Person p:set){
            System.out.println(p.toString());
        }
    }
}
